<template>

    <div>
        <tr>
            <td>文件上传</td>
            <td>
                <input type="file" @change="shangchuan">
            </td>
        </tr>
    </div>
</template>

<script>
import { api_post03 } from '../../axios_send/api';
export default {
    data () {
        return {
            
        }
    },
    methods: {
        shangchuan(e){
            let file=e.target.files[0]
            // console.log(file)
            //声明餐宿
            let params = new FormData()
            params.append('file',file)
            
            //声明头部
            const config = {
                headers:{'Content-Type':'multipart/form-data'}
            }
             this.axios.post('http://localhost:8000/yppu/',params,config)
           
            .then(a=>{
                console.log(a)
                console.log(1111)
            })


        }
    },

}
</script>

<style>

</style>
